from time import*


def sorting(n):
        for i in range (len(a)-1):
               for i in range(i+1):
                       if a[i]>a[i]:
                             a[i],a[i]-a[i],a[i]

a=[int(i)for i in open('m1_sorted.txt')]
b=[int(i)for i in open('m2_reverse.txt')]
c=[int(i)for i in open('m3_shuffle.txt')]

t1=time()
sorting(a)
t2=time()
print('m1_sorted.txt',((t2-t1)*1000)//1,'milleseconds')
t3=time()
sorting(b)
t4=time()
print('m2_reverse.txt',((t4-t3)*1000)//1,'milleseconds')
t5=time()
sorting(c)
t6=time()
print('m3_shuffle.txt',((t6-t5)*1000)//1,'milleseconds')
